
function validatorUserName() {
	uname = dwr.util.getValue("userName");
	if (uname == "") {
		document.getElementById("checkResult").innerHTML = "<font color='red'>\u8bf7\u586b\u5199\u4f60\u7684\u7528\u6237\u540d</font>";
	} else {
		validator.checkUser(uname, callBackResult);
	}
}
function callBackResult(result) {
	msg = "";
	if (result) {
		msg = "<font color='red'>\u7528\u6237\u5df2\u7ecf\u5b58\u5728</font>";
		dwr.util.setValue("checkResult", msg, {escapeHtml:false});
	} else {
		msg = "<font color='green'>\u7528\u6237\u540d\u53ef\u4ee5\u6ce8\u518c</font>";
		dwr.util.setValue("checkResult", msg, {escapeHtml:false});
	}
}
function checkPassword() {
	pwd = dwr.util.getValue("password");
	if (pwd == "") {
		dwr.util.setValue("passwordMessage", "<font color='red'>\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a</font>", {escapeHtml:false});
	} else {
		if (pwd.length < 6) {
			dwr.util.setValue("passwordMessage", "<font color='red'>\u5bc6\u7801\u957f\u5ea6\u8fc7\u77ed</font>", {escapeHtml:false});
		}
	}
}
function checkRePassword() {
	pwd = dwr.util.getValue("password");
	repwd = dwr.util.getValue("repassword");
	if (pwd != repwd) {
		dwr.util.setValue("repwdMessage", "<font color='red'>\u60a8\u4e24\u6b21\u7684\u5bc6\u7801\u4e0d\u4e00\u81f4</font>", {escapeHtml:false});
	} else {
		dwr.util.setValue("repwdMessage", "");
	}
}

